package com.study.talk.utils.alert

import android.app.Dialog
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import com.study.talk.R

class CustomDialog(context: Context) : Dialog(context, R.style.CustomDialog) {
    fun createView(context: Context, dialogLayout: Int): View {
        //放入布局文件
        val inflate = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
        //布局转成View对象
        val view = inflate.inflate(dialogLayout, null)
        //显示布局
        setContentView(view)

        return view
    }
}
